package com.example.rbac.uitls;

import java.util.List;

/**
 * Created by Administrator on 2017/11/16.
 */
public class ArrayUtils {

    private ArrayUtils(){
        System.out.println("test");
    }

    //使用静态内部类实现单例模式
    private static class SingleHandle {
        private final static ArrayUtils arrayUtils = new ArrayUtils();
    }

    public static ArrayUtils getInstance(){
        return SingleHandle.arrayUtils;
    }

    public static boolean isNotEmpty(List list){
        if (list.size() != 0){
            return true;
        }
        return false;
    }

    public static void main(String[] args) {
        ArrayUtils utils = ArrayUtils.getInstance();
    }
}
